<?php

use yii\db\Migration;
use yii\db\Schema;

class m170809_094420_CREATE_TABLE_FINANCE_COMPANY extends Migration
{
    public function up()
    {
        $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        // 产品线路信息
        $this->createTable('finance_company', [
            "id" =>          Schema::TYPE_PK,
            "company" =>     Schema::TYPE_STRING.     "(128) NULL COMMENT '公司名称'",
            "account" =>     Schema::TYPE_STRING.     "(128) NULL COMMENT '账号'",
            "name" =>     	 Schema::TYPE_STRING.     "(16) NULL COMMENT '姓名'",
        ], $tableOptions);

    }

    public function down()
    {
        echo "m170809_094420_CREATE_TABLE_FINANCE_COMPANY cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
